import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    url: '',
    urlList: [],
    imageUrl: '',
    imageDetail: {}
  },
  mutations: {
    SET_URL (state, url) {
      state.url = url
      // console.log(url)
    },
    SET_IMAGEURL (state, url) {
      state.imageUrl = url
      console.log(url)
    },
    SET_URLLIST (state, urlList) {
      state.urlList = urlList.slice(0)
      // console.log(urlList)
    }
  }
})
